﻿using System.Windows.Input;
using Mvvm;
using Play.TrackManagement;
using Utils;

namespace Play.Shell.ViewModels
{
	public class TrackViewModel : ViewModelBase
	{
		private readonly Track _track;

		public TrackViewModel(Track track)
		{
			_track = track;
			ShowEditorCommand = new RelayCommand(ShowEditor);
		}

		public ICommand ShowEditorCommand { get; private set; }

		public string InstrumentName
		{
			get
			{
				return _track.PluginContext.PluginCommandStub.GetProductString();
			}
		}

		private void ShowEditor()
		{
			_track.ShowEditor();
		}
	}
}